import request from '@/utils/request';

// 设备总览
export function overview() {
  return request({
    url: '/index/overview',
    method: 'get'
  });
}

// 执行器在离线
export function onlineOrOffline() {
  return request({
    url: '/index/onlineOrOffline',
    method: 'get'
  });
}

// 查询平台下发设备的开关在线离线动态
export function getDataLog() {
  return request({
    url: '/index/getDataLog',
    method: 'get'
  });
}

// 查询传感器故障上报
export function failureAlarm() {
  return request({
    url: '/index/failureAlarm',
    method: 'get'
  });
}

// 查询楼层房间号
export function floorRoomNumber() {
  return request({
    url: '/index/floorRoomNumber',
    method: 'get'
  });
}

// 查询设备操作数量
export function equipmentOperations() {
  return request({
    url: '/index/equipmentOperations',
    method: 'get'
  });
}


// 查询根据房间号的温湿度均值
export function meanTemperatureHumidity(roomNum) {
  return request({
    url: '/index/meanTemperatureHumidity/' + roomNum,
    method: 'get',
  });
}
// // 查询灵寿县今天的天气
// export function getCityWeather(cityCode,key) {
//   return request({
//     url: 'https://restapi.amap.com/v3/weather/weatherInfo?city=130126&key=d3d79bb934f367e50020c2e69d1dc516',
//     method: 'get',
//   });
// }


